<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {

    protected function _initDb() {
        $dbAdapter = new Zend_Db_Adapter_Pdo_Mysql(array(
            'host' => 'localhost',
            'username' => 'root',
            'password' => '',
            'dbname' => 'test'
        ));
        Zend_Registry::set('dbAdapter', $dbAdapter);
    }

    protected function _initRoutes() {
        $student = new Zend_Controller_Router_Route('student.html', array('controller' => 'student', 'action' => 'index'));
        $default = new Zend_Controller_Router_Route(':controller/:action/*', array('controller'=>'index', 'action'=>'index'));
   
        
        $frontController = Zend_Controller_Front::getInstance();
        $router = $frontController->getRouter();        
        $router->addRoute('default', $default);
        $router->addRoute('student', $student);
    }
}
